﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace WgpgGUI
{
    [ValueConversion(typeof(Boolean), typeof(Boolean))]
    public sealed class BoolToOppositeBoolConverter : IValueConverter
    {
        public Object Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
        {
            return !(Boolean)value;
        }

        public Object ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture)
        {
            return Convert(value, targetType, parameter, culture);
        }
    }
}
